package answeringMachine;



import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.regex.Pattern;



public class Main {

	private static String REGEX = "/[^,/,][^./.]";

	public static void main(String[] args) {

		System.out.println(Misc.Professions[0]);

		String line = ""; 
		// Indicate that you are planning to open a file
		File fleExample = new File("people.txt");
		// Prepare a Scanner that will "scan" the document
		Scanner opnScanner = null;
		try {
			opnScanner = new Scanner(fleExample);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		// Read each line in the file
		while( opnScanner.hasNext() ) {
			line = opnScanner.nextLine();
			// Read each line and display its value
			System.out.println(line);

			Pattern p = Pattern.compile(REGEX);
			String[] items = p.split(line);
			for (int i = 0; i < items.length; i++) {
				System.out.println(items[i] + "\n");
			}
		}
		//De-allocate the memory that was used by the scanner
		opnScanner.close();
	}
	



}
